package com.zerone.dy.demomsg.eum;

public enum MessageType {

    GROPU(2,"群聊"),
    PRIVATE(1,"私聊");

    private int value;
    private String desc;

    MessageType(int value, String desc){
        this.value = value;
        this.desc = desc;
    }

    public int getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    public  boolean eq(int value){
        return this.value==value;
    }

    public static boolean isExist(int value){
        for(MessageType type:MessageType.values()){
            if(type.eq(value)){
                return true;
            }
        }
        return false;
    }
}
